Classify

nottegiornofaticar0 = Piece(
    time_interval=nottegiornofaticar_segment0, 
    title="Don Giovanni", subjs=(40,76))
nottegiornofaticar1 = Piece(
    time_interval=nottegiornofaticar_segment1, 
    title="Don Giovanni", subjs=(40,76))
fftrio00 = Piece(
    time_interval=fftrio_segment00, 
    title="Don Giovanni", subjs=(40,76))
fftrio11 = Piece(
    time_interval=fftrio_segment11,
    title="Don Giovanni", subjs=(40,76))
fftrio2 = Piece(
    time_interval=fftrio_segment2, 
    title="Don Giovanni", subjs=(40,76))
fftrio22 = Piece(
    time_interval=fftrio_segment22, 
    title="Don Giovanni", subjs=(40,76))

Heatmap depicts DWT pairwise distances

Xopera0 = np.stack([fftrio0.percentiles_face(fbands=[2], features=['p85'], factory=wfactories['db4']).features_tint[subj] for subj in fftrio0.percentiles_face(factory=wfactories['db4']).subjects])
Xopera1 = np.stack([fftrio1.percentiles_face(fbands=[2], features=['p85'], factory=wfactories['db4']).features_tint[subj] for subj in fftrio1.percentiles_face(factory=wfactories['db4']).subjects])
Xopera = np.concatenate([Xopera0, Xopera1])
plot_dm_heatmap(Xopera, alignment_type='fastdtw', gamma=1, normalize='log', n_jobs=8)  # 'dcor', 'fastdtw'(euclidean), 'tslearn_dtw'(euclidean), 'soft_dtw'(sqeuclidean), 'soft_dtw_div'

print(f"This is heatmap matrix {2}")
This is heatmap matrix 2
Xopera0 = np.stack([dg0.percentiles_face(fbands=[1], features=['p85'], factory=wfactory('db4', level=8)).features_tint[subj] for subj in dg0.percentiles_face(factory=wfactory('db4', level=8)).subjects])
Xopera1 = np.stack([dg1.percentiles_face(fbands=[1], features=['p85'], factory=wfactory('db4', level=8)).features_tint[subj] for subj in dg1.percentiles_face(factory=wfactory('db4', level=8)).subjects])
depict_clusters(clusters_subj_dg0, dg0.roi_t.position.features_tint)

depict_DTW(Xopera_train[11], Xopera_train[30], dist=euclidean, radius=10)